<template>
<div>
  <p>用户名:<input type="text" v-model="form.username"></p>
  <p>密码:<input type="text" v-model="form.password"></p>
  <p>内容:<input type="text" v-model="form.content"></p>
  <p>广告:<input type="text" v-model="form.headline"></p>
  <p>
    <button @click="add">添加</button>
  </p>
</div>
</template>

<script>
export default {
  name: "New1",
  data(){
    return{
      form:{},
    }
  },
  methods:{
    add(){
      this.axios.post('users/new/',this.form)
      .then(res=>{
        console.log(res.data)
      })
    },
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
